package com.woniuxy.email.listener;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = "direct.queue1")// 监听名为direct.queue1的队列
@Slf4j
public class DirectQueueListener {

    @RabbitHandler
    public void handle(String message) {
        log.info("direct.queue1 接收到消息：{}", message);
    }
}